{==============================================================================}
{  Acroprise Multi-Language Components                                         }
{                                                                              }
{  Copyright (C), 1999-2019, Acroprise Inc.                                    }
{  http://www.acroprise.com.tw                                                 }
{  ALL RIGHTS RESERVED                                                         }
{                                                                              }
{  Author   : Mustapha.Wang                                                    }
{  Version  : 5.2.16.2160                                                      }
{  Creation : 2009/09/12                                                       }
{  Revision :                                                                  }
{  Task     :                                                                  }
{==============================================================================}
unit acroVirtualtreeClassMethod;
{$I acroMultiLang.Inc}
interface
uses
  Classes,Graphics,AcroMultiClassMethod,TypInfo;

implementation

procedure Proc_TVirtualStringTree(ATable:IDataLocate;AComponent:TObject;
  ALCID,ASeqNo:string;AParams:TStringList);
var
  i:integer;
  vObject:TObject;
  vColumns:TCollection;
  vColumn:TCollectionItem;
  vText:string;
begin
  vObject:=TypInfo.GetObjectProp(AComponent,'Header');
  vObject:=TypInfo.GetObjectProp(vObject,'Columns');
  vColumns:=TCollection(vObject);
  for i:=0 to vColumns.Count-1 do
  begin
    vColumn:=vColumns.Items[i];
    vText:=TypInfo.GetStrProp(vColumn,'Text');
    //SL.Add(vText);
    TypInfo.SetStrProp(vColumn,'Text',
      GetDisplayValue(ATable,vText,ALCID,ASeqNo,vColumn,'Text'));
  end;
  {for i:=0 to TVirtualStringTree(AComponent).Header.Columns.Count-1 do
  begin
    SL.Add(TVirtualStringTree(AComponent).Header.Columns[i].Text);
    TVirtualStringTree(AComponent).Header.Columns[i].Text:=
      GetDisplayValue(ATable,TVirtualStringTree(AComponent).Header.Columns[i].Text,ALCID,ASeqNo,
        TVirtualStringTree(AComponent).Header.Columns[i],'Text');
  end;}
end;

initialization
  AcroClassMethodStorage.RegisterClassMethod('TVirtualStringTree',Proc_TVirtualStringTree);
finalization
  AcroClassMethodStorage.UnRegisterClassMethod('TVirtualStringTree');
end.
